import request from '../utils/request'

export const settingsApi = {
  getSettings() {
    return request.get('/settings')
  },

  updateSettings(section, data) {
    return request.put('/settings', { section, data })
  },

  updateProfile(data) {
    return request.put('/settings/profile', data)
  },

  updatePassword(data) {
    return request.put('/settings/password', data)
  },

  getLoginDevices() {
    return request.get('/settings/devices')
  },

  logoutDevice(deviceId) {
    return request.post(`/settings/devices/${deviceId}/logout`)
  }
} 